- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
Email option to embed images as base64 instead of link #32061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6bfebf7    to
    17439b9      
    Compare
  
    | Please have a look at this and let me know if I did some structural things wrong, as I have zero experience with Go but came across the mentioned issues myself and tried to add the optional setting to fix them. | 
cc35853    to
    37428d3      
    Compare
  
    37428d3    to
    d76e949      
    Compare
  
    | Could you have some tests? | 
| 
 I'll have a look. But I'm not quite sure as to what the focus of these test should be, as outgoing emails aren't tested anywhere. I could simply test my own additions whithout any actual email integration (the parsing of the html and replacement of the img tags and whether other image tags stay the same). Sounds fine? | 
| 
 Yes. Thank you. | 
d76e949    to
    49c1522      
    Compare
  
    49c1522    to
    d072c3e      
    Compare
  
    | I added test to this. however I can't integrate them into services/mailer/mail_test.go because I need the testing environment which would form an import cycle. Now I exported the MailCommentContext and my newly added functions. Let me know if there is a way around this, but I see this as nothing big as these functions are not context specific. I'll squash the commits after you reviewed it | 
763b655    to
    6814a96      
    Compare
  
    | Still fails because I didn't account for using minio. Will rework... | 
cd3fea1    to
    1665cba      
    Compare
  
    | Will do some refactoring first before continuing this. Thank you for your patience. | 
# Conflicts: # services/mailer/mail.go
7cd0f0e    to
    f3d6e2d      
    Compare
  
    f3d6e2d    to
    599b78d      
    Compare
  
    | Made some changes: 
 | 
* giteaofficial/main: [skip ci] Updated translations via Crowdin Refactor: move part of updating protected branch logic to service layer (go-gitea#33742) Update changelog for v1.23.5 (go-gitea#33797) Email option to embed images as base64 instead of link (go-gitea#32061) Update TypeScript types (go-gitea#33799) Disable vet=off again (go-gitea#33794)
ref: #15081
ref: #14037
Documentation: https://gitea.com/gitea/docs/pulls/69
Example
Content:



Result in Email:
Result with source code:
(first image is external image, 2nd is now embedded)